import request from './request.js';
let service = request.service;
let formatterUrl = request.formatterUrl;
export default {
 materialArrive(id) {
   /**确认到料接口**/
   return service({
     url: `/adscm/operation/plan/planTaskTotal/materialArrive/${id}`,
     method: 'post'
   })
 },
 materialTailor(id) {
   /**确认下料接口**/
   return service({
     url: `/adscm/operation/plan/planTaskTotal/materialTailor/${id}`,
     method: 'post'
   })
 },
 materialArriveconfirm(data) {
   /**到料签收**/
   return service({
     url: `/adscm/operation/plan/planTaskTotal/nv/materialArrvie`,
     method: 'post',
     data
   })
 },
 planTaskDetailList(tid) {
   /**工序加工面列表**/
   return service({
     url: `/adscm/operation/plan/planTaskDetail/selectByTid/${tid}`,
     method: 'post'
   })
 },
  finishProcess(id){
    /**确认工艺编制完成**/
    return service({
      url: `/adscm/operation/plan/planTaskTotal/finishProcess/${id}`,
      method: 'post'
    })
  },
  returnProcess(id) {
    /**工艺重新编制**/
    return service({
      url: `/adscm/operation/plan/planTaskTotal/againProcess/${id}`,
      method: 'post'
    })
  },
  finishProgram(id) {
    /**确认编程程序编制完成**/
    return service({
      url: `/adscm/operation/plan/planTaskTotal/finishProgram/${id}`,
      method: 'post'
    })
  },
 insertUpdateProcessPlan(type,data) {
    /**insert-新增工艺编制 update-修改工艺编制**/
    return service({
      url: `/adscm/operation/plan/planTaskProcess/${type}`,
      method: 'post',
      data
    })
 },
 deleteProcessPlan(id) {
   /**删除工艺编制**/
   return service({
     url: `/adscm/operation/plan/planTaskProcess/delete/${id}`,
     method: 'get'
   })
 },
 processPlanList1(data) {
    /**根据图号获取工艺编制列表**/
    return service({
      url: `/adscm/operation/plan/planTaskProcess/selectByDrawNo`,
      method: 'get',
      params: data
    })
 },
 processPlanList2(tid) {
   /**根据tid获取工艺编制列表**/
   return service({
     url: `/adscm/operation/plan/planTaskProcessForTask/selectByTid/${tid}`,
     method: 'get',
   })
 },
 /**根据工序名获取工序操作者列表 */
 processOperatorList(data) {
    return service({
      url: `/adscm/operation/plan/planTaskProcess/selectPersonsByProcess`,
      method: 'get',
      params: data
    })
 },
  insertUpdatePlanTaskDetail(type, data) {
    /**insert-新增工序加工面 update-编辑工序加工面**/
    return service({
      url: `/adscm/operation/plan/planTaskDetail/${type}`,
      method: 'post',
      data
    })
  },
  planTaskCutterList(tid) {
    /**获取刀具列表**/
    return service({
        url: `/adscm/operation/plan/planTaskCutter/selectByTid/${tid}`,
        method: 'post'
    })
  },
  insertUpdatePlanTaskCutter(type, data) {
    /**insert-新增刀 update-编辑刀**/
    return service({
      url: `/adscm/operation/plan/planTaskCutter/${type}`,
      method: 'post',
      data
    })
  },
  /**删除刀**/
  deleteCutter(id) {
    return service({
      url: `/adscm/operation/plan/planTaskCutter/delete/${id}`,
      method: 'post'
    })
  },
  /**打印零件工艺流程卡接口*/ 
  printProcess(id) {
    return service({
      url: `/adscm/operation/plan/planTaskTotal/printProcess/${id}`,
      method: 'post'
    })
  },
  getCode(id) {
    /**获取自定义编码条码接口*/ 
    return service({
      url: `/adscm/operation/plan/planTaskTotal/getCode/${id}`,
      method: 'get'
    })
  },
  //根据图号查询供应编制 单价 加工尺寸(长*宽*高) 材质 重量
  technologyInfo(data){
    /**获取自定义编码条码接口*/
    return service({
      url: `/adscm/operation/base/draw/selectByDrawNo`,
      method: 'get',
      params: data
    })
  },
  getAllProgramCutter(processId) {
    /**获取所有面得刀列表 */
     return service({
       url: `/adscm/operation/plan/planTaskCutter/selectByProcessId/${processId}`,
       method: 'get'
     })
  },
  copyPlanTaskCutter(data){
     /**复制选中的刀 */
     return service({
       url: `/adscm/operation/plan/planTaskCutter/copyPlanTaskCutter`,
       method: 'post',
       data
     })
  },
  deleteMian(tid) {
    /**删除工序面 */
    return service({
      url: `/adscm/operation/plan/planTaskDetail/deleteByTid/${tid}`,
      method: 'post'
    })
  },
  batchAddCutter(data) {
    /**删除工序面 */
    return service({
      url: `/adscm/operation/plan/planTaskCutter/insertByNums`,
      method: 'get',
      params:data
    })
  },
   /**修改所有刀列表 */
  updateAllCutter(data) {
    return service({
      url: `/adscm/operation/plan/planTaskCutter/updateAll`,
      method: 'post',
      data
    })
  }
}